<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ include file="/page/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@ include file="/adapter/adapter-bootstrap.jsp" %>
<link href="${pageContext.request.contextPath}/frontframe/easyui/themes/easyui-extend.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
function save(){
	var str_data=$("#form1 input").map(function(){
		   return ($(this).attr("name")+'='+$(this).val());
		 }).get().join("&") ;
    $.ajax({
        url:"${ctx}/appCommodityShow/updateCommodityShow",
        type: "POST",      
        dataType:"json",
        data: $("#form1").serialize(),
        async: false,
        success: function(data) {
        	if(data.model.flag>0){
	            alert("修改成功！");	
	            //window.location.reload();
        	}
/* 	          $.each(data, function(index, element) {
             window.location.reload();
          }); */
        },
        error: function() {
          alert("error");
        }
      });
	
}

function  goBack(){
	window.history.back(-1);
}

</script>
</head>
<body>
     <div class="panel panel-default">
   <div class="panel-heading">
      <h3 class="panel-title">
          商品显示管理
      </h3>
   </div>
   <div class="panel-body">
              <form class="form-horizontal" role="form"  id="form1">
		 		    			<div class="form-group">
		    		   
			   			                 <label class="col-xs-2 control-label" for="record_key">商品编号</label>
                             <div class="col-xs-4">
                                <input class="form-control" id="record_key" name="record_key" type="text" placeholder="" value="${appCommodityShow.record_key}" readonly="readonly"/>
                             </div>
			   			  
                    		 		    		   
			   			                 <label class="col-xs-2 control-label" for="app_id">应用标识</label>
                             <div class="col-xs-4">
                                <input class="form-control" id="app_id" name="app_id" type="text" placeholder="" value="${appCommodityShow.app_id}" readonly="readonly"/>
                             </div>
			   			  
                    			</div>
		    		 		    			<div class="form-group">
		    		   
			   			                 <label class="col-xs-2 control-label" for="commodity_name">商品名称</label>
                             <div class="col-xs-4">
                                <input class="form-control" id="commodity_name" name="commodity_name" type="text" placeholder="" value="${appCommodityShow.commodity_name}"/>
                             </div>
			   			  
                    		 		    		   
			   			                 <label class="col-xs-2 control-label" for="commodity_file_path">商品图片</label>
                             <div class="col-xs-4">
                                <input class="form-control" id="commodity_file_path" name="commodity_file_path" type="text" placeholder="" value="${appCommodityShow.commodity_file_path}"/>
                             </div>
			   			  
                    			</div>
		    		 		    			<div class="form-group">
		    		   
			   			                 <label class="col-xs-2 control-label" for="commodity_src">商品来源</label>
                             <div class="col-xs-4">
                                <input class="form-control" id="commodity_src" name="commodity_src" type="text" placeholder="" value="${appCommodityShow.commodity_src}"/>
                             </div>
			   			  
                    		 		    		   
			   			                 <label class="col-xs-2 control-label" for="jump_url">跳转链接</label>
                             <div class="col-xs-4">
                                <input class="form-control" id="jump_url" name="jump_url" type="text" placeholder="" value="${appCommodityShow.jump_url}"/>
                             </div>
			   			  
                    			</div>
		    		 		    			<div class="form-group">
		    		   
			   			                 <label class="col-xs-2 control-label" for="long_desc">商品介绍</label>
                             <div class="col-xs-4">
                             	<textarea rows="3" class="form-control" id="long_desc" name="long_desc">${appCommodityShow.long_desc}</textarea>
                             </div>
			   			  
                    			</div>
		    		                        <div class="form-group  text-center">
                            <button type="button" class="btn btn-default"  onclick="save();">保存</button>
                            <button type="button" class="btn btn-default"   onclick="goBack()">返回</button>
                      </div>
                </form>
	</div>
	</div>

</body>
</html>
